package pcserver;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class StartWindow extends JPanel implements AbstractWindow {
	private static final long serialVersionUID = 1L;
	
	private ImageIcon bgimage;

	private ImageBtn start;
	private ImageBtn help;
	private ImageBtn exit;
	
	private ImageIcon startIcon;
	private ImageIcon helpIcon;
	private ImageIcon exitIcon;
	private ImageIcon start_on;
	private ImageIcon help_on;
	private ImageIcon exit_on;
		
	public StartWindow(){
		this(new ImageIcon(util.direction + "bg.jpg"));
	}
	
	public StartWindow(ImageIcon bgimage){
		this.bgimage = bgimage;
		startIcon = new ImageIcon(util.direction + "start.png");
		helpIcon = new ImageIcon(util.direction + "help.png");
		exitIcon = new ImageIcon(util.direction + "exit.png");
		start_on = new ImageIcon(util.direction + "start_1.png");
		help_on = new ImageIcon(util.direction + "help_1.png");
		exit_on = new ImageIcon(util.direction + "exit_1.png");

		start = new ImageBtn(startIcon, start_on);
		help = new ImageBtn(helpIcon, help_on);
		exit = new ImageBtn(exitIcon, exit_on);
		
		setOpaque(false);  
		setLayout(null);
		add(start);
		add(help);
		add(exit);
		start.setBounds(440, 60, 200, 50);
		help.setBounds(510, 120, 200, 50);
		exit.setBounds(580, 180, 200, 50);	
	}
	
	@Override
	public ImageIcon getBgimage() {
		return bgimage;
	}

	public ImageBtn getStart() {
		return start;
	}

	public ImageBtn getHelp() {
		return help;
	}

	public ImageBtn getExit() {
		return exit;
	}

}
